The reader

is written by Paul DuBois and consists except besides some initialition stuff of two major parts: The procedures RTFReadToken and RTFRouteToken. RTFReadToken reads unformatted text, ``control words``, ``control symbols`` and ``groups`` from an rtf-file and creates tokens depending on what it has read.

Tokens are associated with up to three classification numbers:

Class number: Broadest (least detailed) breakdown.

Major/minor numbers: Within their class, tokens have a major number, and may also have a minor number to further distinguish tokens with the same major number.

Tokens that can't be classified are put in the ``unknown`` class. For these tokens, the major and minor numbers are meaningless, although rtfTextBuf may be of interest then.

Text tokens are a single character, and the major number indicates the character value (note: can be non-ascii, i.e., greater than 127). There is no minor number.

Control symbols may have a parameter value, which will be found in rtfParam. If no parameter was given, rtfParam = rtfNoParam.

for further details see the includefile ``rtf.h``.

The RTFRouteToken calls a procedure depending on the class of the token and the last call of RTFSetClassCallback. These procedures are in the writer, so the reader can be used by any filter, which reads an rtf-file.